package com.zscat.mallplus.dms.service.impl;

import com.zscat.mallplus.dms.service.IDeviceService;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;


public class LockTokenTask extends QuartzJobBean {
    @Autowired
    private IDeviceService deviceService;

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        try {
//            String token = LockUtil.getToken();
//            QueryWrapper qw = new QueryWrapper();
//            qw.eq("device_type",2);
//            List<QsgDevice> devices = deviceService.list(qw);
//            if (devices.size()>0){
//                for (QsgDevice device : devices){
//                    device.setToken(token);
//                    deviceService.updateById(device);
//                }
//            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
